//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "tools\fn_getSide.sqf"
#include <tmf_constants.h>
#include <tmf_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_side"];
DEFAULT_PARAM(_side,0,"");

if (IS_STRING(_side)) then {
	_side = switch (toupper(_side)) do {
		case "EAST": {east};
		case "WEST": {west};
		case "OPFOR": {opfor};
		case "BLUFOR": {blufor};
		case "GUER": {resistance};
		case "CIV": {civilian};
		default {GVAR(side_enemy)};
	};
};
if (!IS_SIDE(_side)) then {
	_side = GVAR(side_enemy);
};
	
TRACE_1("End",_side);
TMFPROFILERSTOP;
_side;